import '@js/init.js'
import { classData } from '../utils/getData'
renderClassData();
 async function renderClassData(){
    const data = await classData();
    const ClassHtml = data.map(item => {
        return `
                <tr>
                    <td>${item._id}</td>
                    <td>${item.name}</td>
                    <td>${item.objectId.name}</td>
                    <td>
                        <a href="#">修改</a>
                        <a href="#" class='delet' data-id="${item._id}">删除</a>
                    </td>
                </tr>
            `
      }).join('');
      // console.log(ClassHtml);
      $('#classesTb').html(ClassHtml);
}